﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Collections.Specialized;

namespace MediaImporter.Controls
{
    public partial class MatchFiles : UserControl
    {
        public MatchFiles()
        {
            InitializeComponent();
        }

        public NameValueCollection Files
        {
            get;
            set;
        }

        public void RefreshResults()
        {
            dataGridView1.Rows.Clear();
            foreach (string file in Files.Keys)
            {
                dataGridView1.Rows.Add(file, Files[file]);
            }
        }


        internal void MarkAsDone(string sourcePath)
        {
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                if (row.Cells[0].Value.ToString() == sourcePath)
                {
                    row.Cells[0].Style.ForeColor = Color.Green;
                    return;
                }
            }
        }

        private void progressControl1_Load(object sender, EventArgs e)
        {

        }
    }
}
